﻿@model sipfe.model.dataAccess.SIPMaeEmpresa
@using Resources;
@using sipfe.util;
@{
    Layout = "~/Views/Shared/Layaout/general/_LayoutGeneralPopupV2.cshtml";   
}
<script type="text/javascript">
    $(function () {
        calendarioFechaNac('dfecFunda');
        setAutoAyudaCompendioDetalle("#vActivPrin", "#nIdeActPrin", 17, "/AutoAyuda/ListaDetCompendioAuto");
        setAutoAyudaCompendioDetalle("#vActivSecun", "#nIdeActSec", 17, "/AutoAyuda/ListaDetCompendioAuto");
        inicioPopPupModal("#divPopupJQ", 250, 680, "LISTADO DE ACTIVIDADES DE LA EMPRESA");
    });
</script>
<script type="text/javascript" src="@Url.Content(@properties.mantePersonaJS)"></script>
<script type="text/javascript" src="@Url.Content(@properties.validatelJS)" ></script>
<script type="text/javascript" src="@Url.Content(@properties.unobtrusiveJS)" ></script>
@*<script type="text/javascript" src="@Url.Content(@properties.nuevoJS)" ></script>*@
@using (Html.BeginForm("UpdateDatosEmpresaInp", "ManteEmpresa", FormMethod.Post))
{
    @Html.ValidationSummary(false, "Los Siguientes Campos son Obligatorios:")
    @Html.HiddenFor(model => model.nIdeEmpresa)
    @Html.HiddenFor(model => model.nIdeUsuReg)
    @Html.HiddenFor(model => model.dtFecReg)
    @Html.HiddenFor(model => model.dFecIniVig)
    @Html.HiddenFor(model => model.nIdeActPrin)
    @Html.HiddenFor(model => model.nIdeActSec)
    <br />
    <fieldset style="width: 650px;">
        <legend><span>Actualizar Datos de la Empresa / Institución</span></legend>
        <table class="tblInput4" id="exitosa" border="0">
            <tbody>
                <tr>
                    <td>País Emisor<span class="asterisco">(*)</span></td>
                    <td>Tipo documento<span class="asterisco">(*)</span></td>
                    <td>Número documento<span class="asterisco">(*)</span></td>
                </tr>
                <tr>
                    <td>@Html.DropDownListFor(model => model.nIdeCodPaisDoc, (IEnumerable<SelectListItem>)ViewBag.PaisEmisor, "--Seleccione--")</td>
                    <td>@Html.DropDownListFor(model => model.nIdeTipoDocum, (IEnumerable<SelectListItem>)ViewBag.TipoDocIdent, "--Seleccione--")</td>
                    <td>@Html.TextBoxFor(model => model.vNumDocum, new {style = "width:80px;text-transform:none;", maxlength = 20, onkeypress = "return validaAlfaNumTamanio(this,event,20);", onpaste = "return false;", onblur = "javascript:onBlurUpper(this); javascript:validaDocumentoPersona(this,'2','2','upd');" })</td>
                </tr> 
                <tr>
                    <td colspan="3">Nombre o Razón Social  <span class="asterisco">(*)</span></td>
                </tr>
                <tr>
                    <td colspan="3">@Html.TextBoxFor(model => model.vRazonSocial, new { style = "width:650px;", maxlength = 200, onblur = "javascript:onBlurUpper(this);" })</td>                            
                </tr>
                <tr>
                    <td colspan="3">Actividad principal<span class="asterisco">(*)</span></td>
                </tr>
                <tr>
                    <td colspan="3">
                        @Html.TextBox("vActivPrin", null, new { style = "width:630px;", maxlength = 120, Value = (@Model.SIPDetCompendio2 != null ? @Model.SIPDetCompendio2.vNomDetalle : "") })
                        <img src="@Url.Content("~/images/buscar.gif")" class="lupita2" alt="BUSCAR ACTIVIDAD" onclick="javascript:listarActividad('#divPopupJQ','#vActivPrin','#nIdeActPrin');" />
                    </td>
                </tr>
                <tr>
                    <td colspan="3">Actividad secundaria</td>
                </tr>
                <tr>
                    <td colspan="3">
                        @Html.TextBox("vActivSecun", null, new { style = "width:630px;", maxlength = 120, Value = (@Model.SIPDetCompendio3 != null ? @Model.SIPDetCompendio3.vNomDetalle : "") })
                        <img src="@Url.Content("~/images/buscar.gif")" class="lupita2" alt="BUSCAR ACTIVIDAD" onclick="javascript:listarActividad('#divPopupJQ','#vActivSecun','#nIdeActSec');" />
                    </td>
                </tr>
                <tr><td>Fecha de fundación</td><td>Cantidad Trabajadores</td><td>Cuenta bancaria</td></tr>
                <tr>
                    <td>@Html.TextBoxFor(model => model.dfecFunda, new { style = "width:60px;text-transform:none;", maxlength = 10, readOnly = true,@Value = String.Format("{0:dd/MM/yyyy}", Model.dfecFunda) })</td>
                    <td>@Html.TextBoxFor(model => model.nNumTrabaja, new { @class = "textBoxMay", style = "width:50px;text-transform:none;", maxlength = 6,  onkeypress = "return validarSoloNumeros(event);", onpaste = "return false;"})</td>
                    <td>@Html.TextBoxFor(model => model.vCuentaBanco, new { @class = "textBoxMay", style = "width:200px;text-transform:none;", maxlength = 50, onkeypress = "return validaAlfaNumTamanio(this,event,50);", onpaste = "return false;"})</td>    
                </tr>
            </tbody>
        </table>
    </fieldset>           
            
    <table style="width: 500px;" class="tablaInput3">
        <tr>
            <td>El campo es obligatorio<span class="asterisco">(*)</span></td>
            <td><input type="button" value="Registrar Datos" onclick="javascript: addEmpresaPopFinal(this.form);" /></td>
        </tr>
    </table>
}
<div id="divPopupJQ"></div>